	
	int cameraX = INGAME.VIEWPORT_X;
	int cameraY = INGAME.VIEWPORT_Y;
	
	public void UpdateCamera()
	{
		if(isKeyPressed(KEYS.KEY_LEFT) && cursorX <= cameraX)
		{
			cameraX -= INGAME.SCROLLING_SPEED;
		}
		
		if(isKeyPressed(KEYS.KEY_RIGHT) && (cameraX + INGAME.VIEWPORT_W <= cursorX))
		{
			cameraX += INGAME.SCROLLING_SPEED;
		}
		
		if(isKeyPressed(KEYS.KEY_UP) && cursorY <= cameraY)
		{
			cameraY -= INGAME.SCROLLING_SPEED;
		}
		
		if(isKeyPressed(KEYS.KEY_DOWN) && (cameraY + INGAME.VIEWPORT_H <= cursorY))
		{
			cameraY += INGAME.SCROLLING_SPEED;
		}
	}
	
	public void moveCameraTo(int x, int y)
	{
		#ifndef REMOVE_MOVE_CAMERA_TO
		cursorX = x;
		cursorY = y;
		
		if(x - SCREEN_WIDTH / 2 > INGAME.VIEWPORT_X && x - SCREEN_WIDTH / 2 < boardImg.getWidth() - SCREEN_WIDTH)
		{
			cameraX = x - SCREEN_WIDTH / 2;
		}
		else
		{
			if(x > boardImg.getWidth() / 2)
				cameraX = boardImg.getWidth() - SCREEN_WIDTH;
			else
				cameraX = INGAME.VIEWPORT_X;
		}
		
		if(y - SCREEN_HEIGHT / 2 > INGAME.VIEWPORT_Y && y - SCREEN_HEIGHT / 2 < boardImg.getHeight() - SCREEN_HEIGHT)
		{
			cameraY = y - SCREEN_HEIGHT / 2;
		}
		else
		{
			if(y > boardImg.getHeight() / 2)
				cameraY = boardImg.getHeight() - SCREEN_HEIGHT;
			else
				cameraY = INGAME.VIEWPORT_Y;
		}
		#endif
	}